import React from 'react';
import FormBlock from './FormBlock';

const Form5 = props => {
    const {
        form,
        initialFormInfo: { talentCode, recruitTalentEdus = [] }
    } = props;
    const { required = true, ...otherProps } = props; // required为true和false判断走2套校验规则
    const formInfoList = [
        {
            label: '起止时间',
            prop: 'dateRange',
            type: 'dateRange'
        },
        {
            label: '学校名称',
            prop: 'graduateSchool'
        },
        {
            label: '专业',
            prop: 'major'
        },
        {
            label: '学制',
            type: 'select',
            dictCode: 'academicYear',
            prop: 'academicYear'
        },
        {
            label: '学位证书',
            prop: 'degree'
        }
    ];
    const blockProps = {
        ...otherProps,
        form,
        parentFieldData: recruitTalentEdus,
        parentField: 'recruitTalentEdus',
        formInfoList,
        titleText: '教育经历',
        addButtonText: '+添加教育经历',
        id: 'form5',
        required,
        talentCode
    };
    return (
        <>
            <FormBlock {...blockProps}>
                {/* <div style={{ marginBottom: 16 }}>从高到低至少填写一个教育经历</div> */}
            </FormBlock>
        </>
    );
};

export default Form5;
